import { list2Obj } from '@/utils/bizUtils'
// 审核状态
const AUDIT_STATE = [
  {
    label: '全部',
    value: '2,3'
  },
  {
    label: '审核通过',
    value: '2'
  },
  {
    label: '审核未通过',
    value: '3'
  },
]
export const FORM_ITEMS = [
  {
    prop: 'unitName',
    label: '计量单位名称',
    type: 'input'
  },
  {
    prop: 'auditState',
    label: '审核状态',
    type: 'select',
    options: AUDIT_STATE
  },
]
// 列表表头
export const TABLE_COLUMNS = [
  {
    title: '计量单位名称',
    key: 'unitName',
  },
  {
    title: '计量单位组',
    key: 'unitGroupName',
  },
  {
    title: '默认小数位',
    key: 'decimalPlaces',
  },
  {
    title: '审核状态',
    key: 'auditState',
    formatter: (row, column, cellValue) => {
      return list2Obj(AUDIT_STATE)[cellValue]
    }
  },
  {
    title: '审核原因',
    key: 'auditNote',
  },
  {
    title: '来源类型',
    key: 'editStatusStr',
  },
  {
    title: '创建时间',
    key: 'createOpeTime',
  },
]
